package com.hoshiicloud.stock.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.exception.ServiceException;
import com.hoshiicloud.stock.entity.Warehouse;

import java.util.List;

/**
 * 仓库service接口
 *
 * @author : yangcheng
 * @date : 2019/5/18 13:58
 * @mail : maiboyc@163.com
 **/
public interface IWarehouseService extends IService<Warehouse> {

    /**
     * 根据id获取
     * @param id ID
     * @return Warehouse
     */
    Warehouse getById(Long id);

    /**
     * 根据一组id获取
     * @param ids id组
     * @return List<Warehouse>
     */
    List<Warehouse> getByIds(List<Long> ids);

    /**
     * 保存
     * @param entity 实体对象
     * @return boolean
     */
    Long insert(Warehouse entity) throws ServiceException;

    /**
     * 修改
     * @param entity 实体对象
     * @return boolean
     */
    Long update(Warehouse entity) throws ServiceException;

    /**
     * 查询
     * @param entity 查询参数实体
     * @return IPage<Warehouse>
     */
    IPage<Warehouse> List(Warehouse entity);

    /**
     * 删除
     * @param id ID
     * @return boolean
     */
    boolean delete(Long id) throws ServiceException;

}
